package net.zjitc.lib.Synchronized;

/**
 * @author 朱志文
 * @data 2019/10/22 0022
 */
public class MyThread extends Thread {
    MyThreadSynchronized threadSynchronized;
    int num;

//    public MyThread(MyThreadSynchronized threadSynchronized) {
//        this.threadSynchronized = threadSynchronized;
//    }

    public MyThread(MyThreadSynchronized threadSynchronized, int num) {
        this.threadSynchronized = threadSynchronized;
        this.num = num;
    }

    @Override
    public void run() {
        super.run();
        threadSynchronized.increase();
    }
}
